Our sun is an incredible, abundant source of energy that we’re only just now beginning to learn how to tap. Plants, on the other hand, are masters at exploiting the free energy delivered from the sky, so it’s only natural that scientists look to them for inspiration.

Now, an ongoing effort from researchers with the Eindhoven University of Technology in the Netherlands has yielded a promising new type of artificial leaf. Like actual foliage, the faux leaves take in sunlight and use it to create something entirely new, only instead of generating fuel for a living plant, these “mini-reactors” can produce medicine for humans.

The research team has been working on this artificial leaf system for some time, first presenting a prototype back in 2016. Now, the technology has been refined and the researchers say that the colorful fake foliage can be used to create just about any kind of drug imaginable.

Taking cues from Mother Nature, the tiny reactors utilize intricate channels that flow like veins through the leaves. When sunlight hits certain liquids flowing through the leaves it sparks a chemical reaction. This is a process that would normally require electric power, harsh chemicals or both, but by using sunlight to power the medicine production, it becomes much more sustainable.

The scientists envision such systems being used in places where medicine is in short supply and producing it on-site is difficult. Producing anti-malaria drugs in the jungle without a power grid could become much easier thanks to these advancements.

“There are hardly any obstacles to putting this technology in practice, except for the fact that it only works during daylight,” Timothy Noel, who leads the research, said in a statement.

“Artificial leaves are perfectly scalable; where there is sun, it works. The reactors can be easily scaled and its inexpensive and self-powered nature make them ideally suited for the cost-effective production of chemicals with solar light.”