Coffeeholics rejoice! One of the most well-loved drinks in the U.S. and the world could not only boost your energy but also be a cost-effective answer to solving water contamination. A new study says that coffee-infused foam could remove harmful chemicals, such as lead and mercury, from water.

The study, published in the journal ACS Sustainable Chemistry & Engineering, says that coffee grounds from brewing coffee could be a cheap answer for water remediation. Water remediation is the treatment of polluted or contaminated water by removing its pollutant contents to be deemed safe for human consumption.

To prove the power of used coffee grounds, researchers from the American Chemical Society (ACS) infused used coffee into a bioelastomeric foam. Results showed that the coffee-infused foam managed to remove a whopping 99 percent of mercury and lead content from contaminated water within a 30-hour filtration process, Science Daily reports.

Apart from being environment-friendly and affordable, the new discovery also offers a quick and easy way to filter water without any complicated process. The coffee-infused foam could also be discarded after use.

Apart from filtering contaminated water from harmful chemicals, used coffee grounds have proven its flexibility when it comes to recycling. A 2015 study also from the American Chemical Society showed that used coffee grounds could make some food more healthful.

The study, published in the journal of Agricultural and Food Chemistry, says that coffee grounds contains high levels of phenols or antioxidants that could be extracted to increase the nutritional content of food.

Used coffee grounds could also be used as fertilizer for your garden to neutralize acidity as coffee adds nitrogen, potassium and boost magnesium to the soil and plants, as per Natural Living Ideas. To learn more about the ingenious ways to recycle coffee and help the environment, check out the video below.