As good as doctors are at diagnosing what ails you, they’re apparently not great at figuring out which bugs are behind our most common infections. Doctors prescribe antibiotics for nearly 75% of people with coughs, sneezes and runny noses from respiratory infections. But while antibiotics are modern medicine’s strongest weapon against bacteria, most people’s infections—including the flu and common cold—are caused by viruses. And antibiotics aren’t effective against that group of bugs.

There are tests to distinguish between bacteria and viruses, but they require growing the microbes in a culture dish, which could take from one to three days. That’s not especially helpful for people looking for immediate relief at their doctor’s office or emergency room.

MORE: Newly Discovered Bacteria Can Resist All Antibiotics

Dr. Ephraim Tsalik, assistant professor of medicine at Duke University and Durham Veteran’s Affairs Medical Center, and his colleagues may have come up with a potential solution to that problem. They describe in Science Translational Medicine a blood test that could take a few drops of blood and within an hour let the doctor know whether he’s dealing with a bacterial or viral infection, and whether antibiotics are in order.

Get our Health Newsletter. Sign up to receive the latest health and science news, plus answers to wellness questions and expert tips. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

The test, which is still in the early development stages, flips bacteria and virus testing on its head. Instead of searching for hallmark signs of specific bugs, it scans the infected person’s genetic reaction to the microbe. It takes advantage of the fact that our bodies react differently to bacteria and viruses by activating different genes that are part of the immune system.

MORE: There’s Yet Another Downside To Overusing Antibiotics

“Considering the huge vacuum and the void in helping doctors make decisions about antibiotic use, just about any kind of test is an improvement over what’s currently available,” says Tsalik.

Having such a test isn’t just a boon for patients. Currently, overuse and inappropriate use of antibiotics to treat viral infections like the flu are contributing to a massive problem of antibiotic resistance. There are now strains of bacteria that are resistant to all of the existing antibiotics used to treat them; the drugs are useless against these microbes, and many of these strains are well-entrenched in hospitals. Antibiotics are also linked to other health conditions, including diabetes, obesity and other chronic illnesses. Antibiotics used in agriculture, to boost weight in animals such as chicken and cattle, are also generating super-strains of bacteria that could infect people as well.

MORE: New Report Says FDA Allowed ‘High Risk’ Antibiotics to Be Used on Farm Animals

Cutting back on unnecessary and inappropriate use of the drugs is a priority for many health organizations and professionals, including the World Health Organization, and prompted President Obama’s administration to release a National Action Plan for Combating Antibiotic-Resistant Bacteria. Tsalik says that his gene-based approach to distinguish between bacterial and viral infections could help to limit such misuse of antibiotics. Not only can the test distinguish between responses to bacterial and viral infections, but it can also determine when a person’s immune response, which can sometimes include inflammation, fever and other symptoms that are shared with infections, aren’t due to infections at all but are caused by allergies or other conditions such as emphysema.

MORE: DIY Drugs: Antibiotics Could Soon Be Made Out of Your Own Bacteria

Tsalik also points out that current tests for specific microbes like influenza or strep aren’t always helpful, since many people may normally harbor strep, for instance, but the strep bacteria may not be making them sick. Their symptoms may be caused by another bacteria or virus, but testing positive for strep may prompt the doctor to automatically prescribe an antibiotic. While other blood tests are also mining the body’s immune response, Tsalik says that they detect for the presence of these bugs. His test provides an advantage in being able to pinpoint which bug is actually causing the illness and prompting an immune reaction to fight the infection.

Ultimately, that will help doctors figure out in real time what’s actually responsible for a person’s symptoms, and better match them to the right treatment for that infection. With the blood test, Tsalik hopes that may be only a few years away. For now, the test takes up to 10 hours, but he’s confident that time can be shortened to less than an hour so the test can become a more routine part of health care. “What we’re reporting now is by no means the end of the story,” he says. “We are working diligently to translate the signatures we found to make them available in an hour or less using a simple approach that can be done at the patient’s bedside or in an office-based lab.”

Contact us at letters@time.com.