To get a vaccine from a factory to a child who needs it, you often need to cross countries, if not continents. Across that distance, vaccines are relayed through a “cold chain” of insulated boxes, freezers, vehicles, and depots. The chain is as fragile as it is necessary: If any link fails, the life-saving cargo would rapidly thaw and irreversibly degrade.

But if Keith Pardee, from the University of Toronto, and Jim Collins, from MIT, have their way, the cold chain could be a thing of the past. They have developed a technique for making vaccines and drugs at the places where they’re actually needed. And rather than building large manufacturing plants, their method relies on the greatest factories of all: living cells.

Cells contain enzymes that read the instructions encoded within DNA and use them to build biological molecules. Recently, Pardee discovered that those enzymes work even if they are removed from their native cell and freeze-dried. In that state, they’re both stable and portable; they can be kept and moved at room temperature. Add water, and the enzymes whirr into life. Offer them the right DNA instructions, and they’ll start churning out the molecules you want—vaccines, antibiotics, and more.

Manufacturing medicine isn’t the only use for this technology. By freeze-drying the innards of cells onto small paper discs, Pardee also created a cheap way of detecting important diseases, like Zika and Ebola, without relying on laboratories or sequencing machines. Add a drop of saliva or blood to the paper discs, and they’ll change color if the viruses are present.

Pardee never thought that any of this would work. “I thought there’s no way we could freeze-dry these things, and have them all reconstitute and be active,” he says. “I think that’s probably why other people hadn’t tried.”

This approach is part of a growing field called synthetic biology, where scientists remix the genes of living things into bold new combinations. By writing new genetic programs, they can produce yeast that brew antimalarial drugs, or gut microbes that hunt and kill cancer cells. This approach is powerful, but its practitioners still need to grow the modified cells, deal with all the messiness and unpredictability of biology, and cope with a public that’s still concerned about the safety of genetically modified organisms.

That’s what led Pardee to dispense with organisms entirely. Why not just take all the machinery that cells normally use to run the fancy genetic programs, and load them into something else—something inanimate, like a plastic tube or a piece of paper? It would be like downloading a computer’s operating system onto a memory stick, and running it directly from there.

He first tried this in the summer of 2012. One late afternoon, he used a sharpie to draw circles on a piece of paper. Into the middle of these circles, he dropped 35 bacterial enzymes, then freeze-dried the lot—and waited. Eventually, he revived the enzymes with water, and offered them some instructions—a piece of DNA that codes for a glowing green molecule. Sure enough, the paper discs started glowing green. It worked. Now, what to use it for?

As it happened, Alex Green, another member of Collins’ team, was separately developing a set of genetic programs for rapidly diagnosing viral diseases. Known as toehold switches, these programs are designed to recognize the genetic material of a specific virus. When they do, they activate a gene that produces a distinctive color—say, a purple pigment. The toehold switches turn invisible viruses into visible beacons. They also gave Pardee a use for his new papery tech. “I thought: Wow, we can bring these together,” he says.

He and Green designed toehold switches that would recognize the Ebola virus, using sequence information that they downloaded off the internet. Within a day, they assembled the switches, freeze-dried them onto paper, and showed that they can genuinely recognize the virus’s genes. They could even distinguish between two types of Ebola—the Sudan strain, and the deadlier Zaire one. “That was really exciting,” he says. “It was so rational, fast, and inexpensive.” The team published their work in 2014, and spent the next year refining the process.

“By late 2015, we had cracked a lot of the challenges,” says Pardee. Then, in January, the Zika outbreak hit.

Zika is a viral disease that can stunt brain development in babies, and detecting it early it is a pain. You could look for antibodies that react to the virus, but these tend to pick up genetically similar viruses like dengue, which are found in the same places. You could sequence the virus’s genome, but that involves transporting blood samples to cities with sophisticated labs and scientific equipment. What you really want is a cheap, reliable sensor that can be taken out into the field. “Jim called Alex and me and said here’s a chance to demonstrate our tech again, and show its relevance,” says Pardee. They dropped everything else and got to work.

The team quickly developed a paper-based, color-changing Zika sensor, and incorporated it into a $250 electronic reader. It’s sensitive: It could detect very low concentrations of virus in the blood of an infected monkey. It’s specific: It doesn’t react to dengue virus. It can even tell the difference between distinct Zika strains, even if they differ by a single genetic change. And it took just six weeks to make.

The next time will be even faster. Green has now developed a computer program that will look at a virus’s genome and design toehold switches that recognize specific sequences—those that aren’t found in other viruses or in the human genome. “The algorithm really does a lot of the heavy lifting for the team,” says Pardee. “We can now put out a system for a new target in probably a week.”

In the meantime, the team has just received funding for a field trial, in which they’ll test their Zika sensor on large numbers of people in South America. And since all of this runs on the same freeze-dried, cell-free components, the sensor should work in the heat and humidity of tropical outbreaks.

The Zika sensor hints at the most exciting application of the freeze-dried extracts. At its core, it is a way of producing a colored chemical on demand. And because that works, it’s also possible to manufacture more medically useful substances, like drugs and vaccines, in hot developing countries where manufacturing facilities are scarce and access to medicine is limited by a cold chain.

For this application, Pardee’s team avoids paper. They freeze-dry DNA instructions for making the chemical of choice, the enzymes that will carry out those instructions, and liquids that provide the right conditions for the manufacturing process. The result is a “reaction pellet”—a chemical reaction on pause. To press play, just add water.

In this way, the team created a variety of medical molecules, including: antimicrobial chemicals for killing bacteria; antibodies for targeting cancer cells; and vaccines like the diphtheria vaccines, which is famously challenging to distribute because it is exquisitely sensitive to being thawed and refrozen. The products all behaved as expected: the antibodies really did attack cancer cells, and the vaccines triggered strong immune reactions in mice. “Each product has its own personality and requirements, but once you have those conditions worked out, the process is reliable,” says Pardee.

The process is also efficient. It produced the diphtheria vaccine at amounts comparable to commercial systems, for a fraction of the cost. Other chemicals, like some of the antimicrobials, were more expensive to make, but “the cost is at least close enough that you’d feel the added benefit of making the drug on site,” says Pardee. “And it’s only going to get less expensive.”

“The underlying methods for this process have long been known, but their application to this problem is unique and shows the power of combining engineering with biology,” says the synthetic biologist Danielle Tullman-Ercek, from the University of California, Berkeley.

Decades down the line, this technology may allow researchers in remote jungles or Antarctic stations to make drugs and vaccines on demand, as long as they bring a library of freeze-dried pellets with them.

The library might not even be necessary. For the moment, it’s still expensive to make DNA. But as the cost of synthesizers falls, “you could transmit the sequence of the molecular manufacturing instructions—the genes—and have them be synthesized on site,” says Pardee. Picture a group of astronauts, on their way to Mars, dealing with a sick crew member by downloading the instructions for making the latest drug and adding them to a simple freeze-dried pellet.