When life gives you lemons, you make lemonade—everyone knows that. When life gives you 1,250 gallons of ruined mayonnaise, though, the instructions are a little less clear.

Michigan State University found themselves in just this situation last December, when freezing temperatures compromised 500 containers of dining hall mayonnaise, each of which held 2.5 gallons. The solution? They turned it into energy.

After “students in the cafeteria complained,” and the local food bank turned it down, the mayonnaise needed a new home, writes The State News. So Carla Iansiti, a school Sustainability Officer, dreamed one up: they fed it to the university’s anaerobic digester, which is used to power some farms on the south side of campus.

The 500 2.5 gallon containers of mayonnaise were dumped in the anaerobic digester on Dec. 2, 2016 https://t.co/SIU1iPbyFN — The State News (@thesnews) April 6, 2017

In the anaerobic digester, microorganisms eat biodegradable waste and produce biogas, which can then be combusted into heat and electricity. Iansiti figured the tiny critters, which thrive on sugar and fats, would love mayonnaise.

After a few hours during which 12 volunteers poured gallon after gallon of smelly white stuff into a giant dumpster, all of the mayo was taken care of. “It was a perfect situation to turn what could have been a catastrophe into something positive,” said Sustainability Officer Cole Gude. You might even say the may-o became will-o.

Every day, we track down a fleeting wonder—something amazing that’s only happening right now. Have a tip for us? Tell us about it! Send your temporary miracles to cara@atlasobscura.com.

Gastro Obscura covers the world’s most wondrous food and drink.

Sign up for our email, delivered twice a week.