Starbucks in Hong Kong is looking into a new kind of recycling to lighten their environmental footprint. Scientists from the City University of Hong Kong have partnered with the city’s Starbucks to recycle their coffee grounds and stale muffins into useful products.

In the same way that crude oil can be broken down into fuel and plastics for other consumer products, a new process called biorefinery can convert any plant-based material into bio-based fuels, plastics, even laundry detergents.

Hong Kong Starbucks produce more than 5,000 pounds of coffee grounds and uneaten baked goods.  That would normally be garbage headed for a compost heap, incinerator, or landfill, but with the tender application of science—and a special kind of fungus—the plant-based garbage could be broken down into simple sugars and then transformed into succinic acid, a building block that can be made into detergent, plastics, even medicines.

This anaerobic digestion technology can also be used to create energy, but using raw food material has been controversial.  Experts believe it would merely drive up food prices, making it a very shortsighted solution. But recycling food waste into energy or other products could actually solve several problems at once—diverting tons of garbage from landfills and reducing the use of virgin products in manufacturing.