Why did you get the flu this winter, but your co-workers didn’t? The answer, according to a new study of twins, may have less to do with your genes and more to do with your environment—including your past exposure to pathogens and vaccines.

Our immune system is incredibly complex, with diverse armies of white blood cells and signal-sending proteins coursing through our veins, ready to mount an attack on would-be invaders. Everyone’s immune system is slightly different—a unique mixture of hundreds of these cells and proteins. But the main driver of this variation is unclear. Although scientists know that our immune system can adapt to our environment—that’s why vaccines work, for instance—it is also built by our genes.

To unravel the competing influences of nature and nurture, researchers led by immunologist Mark Davis of Stanford University in Palo Alto, California, turned to the gold standard test: a twin study. Identical twins are nearly the same genetically, whereas fraternal twins share only about half of their genes. If a trait is hereditary, identical twins will be more likely to share it than fraternal twins, allowing scientists to tease out the genetic component.

After recruiting 210 identical and fraternal twins between 8 and 82 years old, Davis and colleagues took blood samples and measured more than 200 parameters of their immune systems. For example, they measured the numbers of 95 kinds of immune cells and 51 kinds of proteins. Today, the researchers report online in Cell that identical twins’ immune systems were too different for the variation to boil down to genetics. Indeed, environment overshadowed inheritance in three-quarters of the measurements, and half showed no measurable genetic influence. Moreover, younger twins were more similar than were older twins, evidence that as the twins aged and were exposed to different environments, their immune systems diverged over time.

The researchers also looked for genetic influence in the twins’ responses to flu vaccines. Some people react more strongly to vaccines than others, producing more antibodies: proteins that our bodies manufacture to identify and protect us from invading microbes. If this trait were genetic, identical twins would have similar responses. Instead, the variation in responses was almost entirely the result of environmental differences—presumably, what strains of flu the twins had previously been exposed to.

The researchers also studied the immune system impact of cytomegalovirus, which lies dormant in a large fraction of the population, rarely causing symptoms. Pairs of identical twins with different infection statuses—one was infected and the other was not—had more divergent immune systems than sets of twins in which both were uninfected. In fact, cytomegalovirus infection influenced nearly 60% of the parameters the scientists measured. “That’s kind of a smoking gun” that the variation is environmental, Davis says.

The work goes beyond previous research in its scope, says immunologist Jean-Laurent Casanova of Rockefeller University in New York City, who was not involved with the research. “To do a twin study and measure a tremendous number of immunological parameters, that is very novel.”

“There’s nothing here that is revolutionary or requires rethinking of our assumptions about how the immune system functions,” says David Baltimore, a biologist at the California Institute of Technology in Pasadena. But, he says, “I found it very impressive … that as we age, our immune systems become molded in increasingly individual ways.”