Under development and testing by Stanford University professor Shanhui Fan and his research team, the (pictured above) rooftop device is designed to make electricity from sunlight while also beaming heat away from buildings in a process called “radiative cooling.”

Sunlight passes through the device’s top layer, which is made up of the standard materials for solar cells. But technology in the device’s bottom layer bounces heat back to space by vibrating infrared light at a frequency that allows it to pass through the atmosphere.

“We’ve built the first device that one day could make energy and save energy, in the same place and at the same time, by controlling two very different properties of light,” says Fan, in an interview with the Stanford News about the device. When perfected, the technology is poised to change how buildings go about managing energy consumption and heating and cooling.

“We think we can build a practical device that does both things,” Fan says.