Cows and cars are two of the worst polluters. Now, California is piloting a barn-to-biogas closed loop where farm waste will fuel the next generation of climate-friendly cars.

On paper, it looks like the kind of loopy kid logic that inspires eight-year-olds to ship their leftover brussels sprouts to starving nations: What if you could capture waste from dairy farms and repurpose it to power cars and factories?

Here’s the thinking: California’s cows and cars are both polluters—methane from cows and carbon monoxide, nitrogen oxide, and hydrocarbons from cars. So, hypothetically speaking, if you could somehow gather up all of the state’s dairy farm waste and convert it into gas for cars (this is compressed hydrogen gas we’re talking about, not gasoline—more on that later), you’d solve half the problem. And because the cars in question run on hydrogen, they emit nothing but water vapor from their tailpipes. It’s a perfect farm-to-Fiat cycle. And all the necessary technology already exists. But who’s going to connect the dots?

In California, the infrastructure required for such a feat has been edging closer and closer to reality.

But let’s back up for a minute and go to Indiana. Why? Well, it was a dairy farm in that state that inspired the above hypothetical. Sometime around 2010, Fair Oaks Farms, about 100 miles north of Indianapolis, began converting its own cow and pig manure into low-emission natural gas fuel and electricity and using the product to power its facilities and a fleet of trucks. It was Fair Oaks that proved the first part of the above equation possible.