Scientists from the University of California, Berkeley, have developed a device that attaches to everyday smartphones and turns them into microscopes, which they can then use to analyze blood samples for traces of parasitic worms.

The existing technology in Central Africa is expensive and hard to come by: Visiting scientists are forced to analyze potentially toxic blood samples in a laboratory, sometimes far away from the remote villages in which people live. Specifically, the new technology, called CellScope, helps researchers in the field detect deadly infections in people who have been bitten by disease-carrying insects.

While they have made strides in a drug named ivermectin, which has successfully treated two forms of infection, a third form called Loa Loa poses a threat to people taking the medication. As a result, teams have had to scrap the drug entirely. But with CellScope, they can avoid the guesswork of determining which parasites are at the root of the infection and save lives with the original drug.

“This is a very important technology,” said Dr. Peter Hotez, tropical disease specialist from Baylor College of Medicine to The Associated Press, adding that in terms of CellScope’s cost-effectiveness and accessibility, “it’s very practical.”

UC Berkeley isn’t the only institution working on a smartphone-cum-microscope. Recently, University of Houston researchers developed an optical lens that can attach to any smartphone camera for just three cents and deliver up to 120 times the magnification power. Before them, labs at Columbia University and Massachusetts General Hospital have separately developed attachable devices to check for disease in stool samples, blood samples, and tissues samples.

Berkeley’s mission differs in its application, said Dr. Daniel Fletcher, who led the investigation of the work. “We're using this phone not just as computer power or for its camera, but to run the test,” Fletcher explained to the AP.

Hooking into the phone, the device uses the smartphone’s video function to detect discreet movements in the blood sample, calibrated to the individual parasite. Initial tests showed CellScope matched laboratory to a significant degree in 33 subjects. Fletcher and his team plan to roll out the technology in Cameroon in the thousands with help from the Bill and Melinda Gates Foundation.

Future research will look at CellScope’s ability to expand into screening for other viral and bacterial infections that can cause blindness and disability.

“The availability of a point-of-care test prior to drug treatment is a major advance in the control of these debilitating diseases,” said aquatic ecologist Vincent Resh, a professor in UC Berkeley’s Department of Environmental Science, Policy and Management. “The research offering a phone-based app is ingenious, practical, and highly needed.”