It’s a question that has perplexed scientists: does diarrhea have a purpose?

That is, is diarrhea is a symptom of disease, or does diarrhea actually help clear the bacteria causing an infection.

Cecile Borkhataria of the Daily Mail reports that scientists have found in sick mice, proteins caused microscopic leaks in the intestinal wall that let water in, making the mouse poop looser and limiting disease severity.

The study, conducted by researchers at Brigham and Women’s Hospital (BWH), looked at the immune mechanisms that drive diarrhea.

Diarrhea can have many different causes, including infections, certain types of medications, too much caffeine or alcohol and many more.

It happens when there’s an excess of water in the intestines, which is normally re-absorbed by the body.

The intestinal wall is lined with cells, and some water can pass through the cells, holes in the lining or via junctions between the cells.

‘The hypothesis that diarrhea clears intestinal pathogens has been debated for centuries,’ said corresponding author of the study Dr Jerrold Turner of the BWH Departments of Pathology and Medicine.

‘Its impact on the progression of intestinal infections remains poorly understood.

‘We sought to define the role of diarrhea and to see if preventing it might actually delay pathogen clearance and prolong disease.’

To conduct the study, the researchers used a mouse infected with a bacteria called Citrobacter rodentium – the mouse equivalent of an E. coli infection.

Within two days of the mouse being infected, the researchers saw an increase in the permeability of the mouse’s intestinal barrier – leading to water entering the intestines, causing diarrhea.

This occurred well before inflammation cellular damage of the intestines.

The researchers discovered two new proteins involved in causing diarrhea – interleukin-22 and claudin-2, which humans possess too.

They found that when the mouse was infected, immune cells travelled to the intestinal wall and produced interleukin-22.

Interleukin-22 binds to cells on the intestinal wall, causing the release of another protein called claudin-2.

It’s claudin-2 that causes the leak in cellular junction in the intestinal wall, allowing water to enter it and cause diarrhea.

The researchers tested three different kinds of mice – regular mice, genetically modified mice that produce large amount of claudin-2, and mice that didn’t make any claudin-2.

The regular mice had diarrhea when they got sick, and the mice that made more claudin-2 always had diarrhea.

The mice that didn’t make any claudin-2 had more e injuries to their intestinal lining, and they still had diarrhea because it seemed as though their immune system attacked the cells help make some diarrhea.

In related poop news, Rob Knight, one of the founding fathers of gut microbiome research, in 2012, used the crowdfunding platform FundRazr to coax more than 9,000 volunteers into first donating money, and then sending samples of their poop through the mail. A team of researchers probed these samples for bacterial DNA to create the first census of the 40 trillion or so bacteria that call our guts their home.

Kyle Frischkorn of the Smithsonian quotes Knight, who directs of the Center for Microbiome Innovation at the University of California at San Diego, as saying, “You get an ongoing input of microbes from your environment—microbes you eat on food itself.”

One of the mysteries sparked by the American Gut Project was why two people who claimed to follow the same diet could have such different communities of gut microbes. For the study, volunteers had self-reported their diets, with the vast majority following omnivorous diets, and less than 3 percent each identifying as “vegetarian” or “vegan.” When researchers crunched the numbers, however, they found no discernible correlations between gut communities and those with seemingly similar diets.

“Diet categories were completely useless and didn’t correlate with the microbiome communities at all,” says Knight.

In other words, the bacteria in poop were telling a different dietary story than the people making that poop. “You can be a vegan who mostly eats kale, or you can be a vegan who mostly eats fries,” Knight explains. “Those have totally different consequences for your microbiome.” Anyone can claim to be a die-hard adherent to the Paleo Diet, it seems, but the data suggested that the microbiome remembers all those midnight ice cream transgressions.

Knight realized that the results of the American Gut Project were missing something crucial: A deeper dive into the food we eat. Filling that gap would mean analyzing all the food going in, and seeing how it correlated with the patterns in what comes out. But while collecting poop was, in some sense, straightforward—each person “submits a sample” in the same way—tallying up all the many foods people eat would be a lot more ambitious.

Every time you ingest, you change the interior landscape of you. Because the bulk of bacteria in the microbiome live in the gut, when we feed ourselves, we feed them too. The chemistry of what we eat, be it fries or kale, alters the chemical landscape of the gut, making it more cozy for some and less hospitable for others.

It gets livelier. Because microbes are everywhere—on the table, in the air, on the surface of the muffin you left out on the counter—you’re also adding new microbes to the mix. Some stroll through your body like polite tourists. Others stick around and interact with the locals. Every bite has the potential to alter the microbiome, and subsequently human health. But researchers have yet to figure out how.

That’s because, until now, we didn’t have the platform to embark on the massive endeavor of collecting and analyzing food samples from around the world. Thanks to the American Gut Project, Knight and his team aren’t starting from scratch. Initially, the researchers plan to collect 1,000 samples from every brick of the familiar food pyramid, and then they’ll open it for the public to submit whatever foods they’re curious about.

“We know about calorie count, and about different food groups, but the whole world of the molecules and the microbes in our food is a black box,” says Julia Gauglitz, a post-doctoral researcher at the Center for Microbiome Innovation who will direct a new project. As the old adage goes, “we are what we eat,” she says. And yet, when you get down to the microscopic level, “we know very little about what we’re consuming.”

Everything we eat is the cumulative product of the chemistry and microbes in the soil where it was grown, the factory where it was processed, and whatever you touched right before you ate it. Why is that important? Ultimately, the team hopes, demystifying the microbial patterns in our food will help us better engineer our diets to improve our health and ward off disease.

Knight draws a historical parallel to the discovery of essential nutrients. In the last century, researchers figured out that industrially processed foods had become nutrient-depleted. By artificially adding vitamins and minerals back in, deficiency diseases like rickets and beriberi were largely eliminated from the Western world. Similarly, understanding the health effects of the microbiome could allow us to engineer those missing microbes back into our meals.

“It’s fairly likely that our modern lifestyles are stripping out a whole lot of live microbes that we need to maintain health,” says Knight. “Getting an understanding of that could be as important as the understanding that vitamin C is necessary and making sure that everyone got enough of it.”