Swedish researchers have found a commercially available breathing test device can be used to detect 12 controlled substances, including marijuana, cocaine, heroin and methamphetamine, US News reports.

The device was tested on 47 people who had taken drugs in the previous 24 hours and were recovering at a drug addiction emergency clinic, the researchers report in the Journal of Breath Research. The test correctly detected drug use in 87 percent of cases, and was as accurate as blood and urine tests.

Currently, police do not have a simple way to test drivers for drugs when they are suspected of driving under the influence (DUI), the article notes. Lead researcher Olof Beck of the Karolinska Institutet noted in a news release, “Considering the samples were taken 24 hours after the intake of drugs, we were surprised to find that there was still high detectability for most drugs.” Dr. Beck said police could use the test at the scene when DUI is suspected, and later confirm the findings with a blood test.

The researchers collected breath samples using a currently available breath test called SensAbues, which consists of a mouthpiece and micro-particle filter. When a person breathes into the mouthpiece, the device separates saliva and larger particles from the tiny particles that are measured. The micro-particles pass through and deposit onto a filter, which is sealed and stored. The particles are then analyzed using lab tests known as liquid chromatography and mass spectrometry.