A few months ago, romaine lettuce grown in the Yuma, Ariz. region was yanked from shelves across the country due to E.coli contamination. That outbreak affected 210 people in 36 states, sent 96 people to the hospital, and killed five, according to the latest estimates from the Centers for Disease Control and Prevention (CDC). And now, health officials finally know what caused the outbreak in the first place: contaminated water.

E.coli is a bacteria that’s found in the environment, foods, and intestines of people and animals. Most strains are harmless but some kinds (including E. coli O157:H7, which was behind this outbreak) can make you sick. That kind, along with several other types of E.coli, can cause issues like diarrhea (that is often bloody), vomiting, fever, kidney failure, and even death, the CDC says.

E.coli can get into your food at all levels of production, including when it’s grown, harvested, processed, and packaged, Benjamin Chapman, Ph.D., an assistant professor and food safety extension specialist at North Carolina State University, tells SELF. But during the investigation into this particular outbreak, the Food and Drug Administration (FDA) wasn't able to link the romaine lettuce outbreak to a single grower, harvester, processor, or distributor.

Now, the FDA has revealed that samples from canal water in the area contained the same strain of E. coli responsible for the outbreak. Investigators aren't sure exactly how the canals in this outbreak were tainted, FDA commissioner Scott Gottlieb, M.D., explained in the statement. But food safety experts have some ideas.

These canals are specifically designed to help catch water and irrigate the crops, Michael Doyle, Ph.D., regents professor of food microbiology at the University of Georgia’s Center for Food Safety, tells SELF.

Canals like those related to the outbreak are built in what were originally rural areas, but now the land around a few of them has been built up, Doyle says. That leaves them open to all sorts of potential contaminations that weren't a factor when they were built. For instance, people may walk their dogs next to them and, if dogs poop or pee near the canals, rain can wash that stuff directly into the canal.

Even in areas that are still rural, wild animals can and do drink out of them, bathe in them, poop in them, and do whatever else animals do in and next to bodies of water, Chapman says. And, given that E. coli can live in an animal’s intestines, it can get into the water that way. (However, the water does go through some level of purification before it reaches crops.)

That water is then used to hydrate the crops, and it’s possible that E.coli could then contaminate the crops through simple watering, Darin Detwiler, Ph.D., director of the Regulatory Affairs of Food and Food Industries program at Northeastern University, tells SELF. It's also possible that rainwater could overflow a canal, spreading E.coli-contaminated water into ground water that then reaches the crops.

There are regulations in place to prevent this sort of thing, but they aren't foolproof.

Currently, the Food Safety Modernization Act helps regulate the way food in the U.S. is grown, produced, and handled in the U.S. This requires farms to test 20 samples of surface water (to be collected over two to four years) for E. coli. After that, farms have to test at least five samples every year. But even with this sampling process in place issues can still arise because "not all water that hits produce is tested," Chapman explains.

However, as Dr. Gottlieb explained in his FDA statement, the fact that this outbreak was identified and shut down as quickly as it was is actually a good thing and is a sign that recent technological advances—such as whole genome sequencing—are really helping.

There are things you can do at home to make sure you're eating the safest foods possible, including keeping an eye out for recalls, adhering to basic food safety rules (e.g. keep your raw veggies separate from your raw meat), and, as Chapman recommends, trying to buy from companies that have a reputation for following good agricultural practices and focus on risk reduction.

“Even then we won’t get zero risk, but it will help,” Chapman says. “And the more we pay attention to this, the better it will be.”