Who knew a primal toy invented thousands of years ago would be the key to a medical breakthrough? Seen more commonly now as lawn ornaments than kids toys, whirligigs are playthings made of two main elements: a static piece that doesn’t move, and another piece anchored to it that spins around it when coaxed. Like this:

In the medical industry, devices using the same physical principals are called centrifuges. These machines rapidly spin containers holding fluids (like urine, blood, and stool samples) around an axis. The speed and motion – which is called centrifugal force, if you speak doctor – can be likened to twirling a bucket with water upside-down so fast the water doesn’t spill.

These toys, who first made their appearance in 3300 B.C., are the inspiration behind the latest iteration of centrifuges being used to diagnose diseases like malaria and HIV in rural areas without access to labs and high-tech equipment.

“A couple of years ago, I experienced a moment in Uganda while talking to primary health workers, which made me realize centrifuges are a critical part of a diagnostics lab infrastructure, and they were missing from most places,” said Manu Prakash, an assistant professor of bioengineering at Stanford University. “Even places that have them – either they break in the field or, because of no electricity, are not even used. I saw one being used as a doorstop.

He and his team began looking for a man-powered solution that was cheap enough to be accessible to countries who really need it. They experimented with yo-yos and other toys to figure out the ‘how’ of the equation.

The solution is the mind-blowing Paperfuge. Standard medical centrifuges, which cost anywhere between $1,000-$5,000 each, spin at a rate of 125,000 revolutions per minute (rpm). The team was surprised to discover the prototype they’d created of paper, fishing line, wood for the handles, and straws to hold the liquid sample, was able to separate plasma from blood in 1½ minutes and isolate malaria parasites in just 15.

It cost them 20 cents to make.

“A billion people who live with no infrastructure and resources can afford them,” Prakash says. “You can carry them around in your pocket.”