Some of our biggest enemies are invisible to us. For the last two centuries, our fight against microbes has saved millions of lives. But, while antibiotics have helped us deal with most bacterial infections, we’re still learning how to fight viruses.

Scientists have now developed a new test that could be crucial in improving our immunity against viruses. For $25 and a drop of your blood, Stephen Elledge of Harvard Medical School and his colleagues can now create the history of all viruses that have ever invaded your body.

Their test has two major benefits. At an individual level, this information could prove vital to healthcare.

For instance, many viral invasions show no symptoms. Instead the virus finds a place in the body where it lies dormant for decades. As soon as your immune system weakens, because of another infection or immune-system-suppressing drugs, which are given during cancer therapy or organ transplants, the virus begins its attack. Knowing the history of viruses that invaded you can help doctors prepare for such side-door attacks.

At a population level, if enough number of people around the world do this test, it can reveal information about how viruses spread and evolve. This could prove vital in helping us fight outbreaks and stop them from becoming pandemics.

For instance, the Middle East respiratory syndrome (MERS) is caused by a coronavirus which we hadn’t detected till 2012 and still don’t understand very much about. One of the reasons MERS is spreading quickly through South Korea is because healthcare officials were not careful enough, a problem that information about the spread of a virus could address. The new test could also help in such situations and also in rapid development of vaccines.

The technique behind the test Elledge developed is elegant. He first created a library of 100,000 protein fragments. The proteins represent sections of nearly 1,000 strains of viruses and should be recognized by antibodies of the immune system that are produced on exposure to those viruses. Once created, these antibodies linger in the blood all your life and thus can be tested for.

When the large number of proteins are added to a sample of blood, those that attach to antibodies are isolated. Once analyzed, these antibody-protein complexes gives you a history of all the viruses that ever invaded your body.

Elledge tested more than 500 young and old people in the US, Thailand, South Africa, and Peru, and, in results published in Science, they found that on average those people had been exposed to 10 virus species in their lives—mostly those that cause common ailments such as flu—and each species has many strains. Two of those tested had been exposed to as many as 84 virus species.

The test is not perfect. For instance, it cannot detect invasions of viruses that we have not yet been discovered. Still, it is bound to have a lot of use.