If food waste were a country, it would be the third-largest greenhouse gas emitter, according to the United Nations Food and Agriculture Organization. In the United States alone, food waste generates the same amount of greenhouse gas emissions as 37 million cars, according to the Natural Resources Defense Council. That accounts for both the energy used in agriculture to grow unused food, as well as the methane that’s released when the food rots in landfills.

That’s the bad news.

The good news is that cities are coming up with solutions. Because most municipalities run their own sanitation systems, said Yvette Cabrera, deputy food waste director at the Natural Resources Defense Council, they’re “uniquely positioned to tackle the problem.”

Here are three main strategies cities are using.

Target waste

Those sanitation systems give cities a lot of control over what happens to discarded food, and some are cracking down on waste.

Seoul, South Korea, for example, charges a fee for food waste. Families pay by weight. At recycling sites, the waste is processed: Part is used for biofuels, while some is turned into fertilizer to help urban farms. The city also has over 6,000 automated bins where residents can weigh their food waste and pay their fees, according to the World Economic Forum.

Seoul now recycles 95 percent of its food waste, up from less than 2 percent in 1995.

A version of that was tried in the United States in 2015, when Seattle introduced an anti-waste program that, among other things, made it illegal to toss out food. A year later, a judge tossed out the measure’s enforcement provision when she ruled it was unconstitutional for trash collectors to snooping in garbage for edible morsels.