Making drinking water safe to consume is actually more complicated than you might imagine. Destroying bacteria in any water source can be a challenge, and the methods that are used to cleanse water before it is made available to the public are often costly and not great for the environment.

Now, researchers in China have come up with a novel new method for eliminating bacteria in drinking water that uses a special material and a bit of sunlight to disinfect large quantities of water in a relatively short period of time. A paper on the new method has been published in the journal Chem.

As ScienceAlert reports, the researchers utilize sheets of a material called graphitic carbon nitride which, when struck by ultraviolet light, creates molecules called reactive oxygen species, or ROS for short. ROS are efficient at killing bacteria, and the scientists demonstrated that enough of them are produced by the material to sterilize over 2.5 gallons of water in about an hour.

The team tested the method by purifying pathogen-infested water. At the 30 minute mark, over 99.9999% of the bacteria, including E. coli, had been eliminated. This new strategy is much more environmentally friendly than some other popular water treatments, with less waste and possibility of contamination by heavy metals.

“The future application of photocatalytic disinfection technology can significantly relieve clean-water scarcity and global energy shortage,” senior author Dan Wang said in a statement. Wang and his colleagues believe their system could be used in conjunction with other water purification processes that perform other duties, such as filtering for metals and leveling the pH, ultimately making clean drinking water with less waste.