A group of researchers recently unveiled a device that can desalinate water and produce electricity at once by using heat from a solar panel to power the water-filtration process.

In the US, public water systems account for around 6% of the nation’s electricity consumption, since purifying water and distributing it to local water systems requires energy.

Producing solar power via panels requires about 300 times fewer gallons of water than a thermoelectric power plant, but it can be more costly and doesn’t generate as much electricity.

Last month, the researchers published a paper describing this new solar technology, which can simultaneously desalinate water and produce electricity.

To test the quality of the water that comes out, the researchers fed salt water and water containing heavy metals like lead, copper, and magnesium into the distiller.

More than 2 billion people worldwide lack safe drinking water in their home, and the team behind this new device isn’t the only group working on solar-powered water production.

The researchers wrote that the device could help energy companies lower some of the costs of building and operating solar farms, given that it can produce clean water as well.