Certain kinds of gut bacteria in babies have been linked to lower incidence of allergies and reduced obesity risks down the road. It turns out research also indicates the stuff in your kid’s gut may also be a factor in some of the behavior that gives 2-year-olds their “terrible” reputations.

According to a 2015 study published in the journal Brain, Behavior and Immunity, the amount and combinations of certain gut bacterias found in the gastrointestinal tracts of toddlers between 18 and 27 months appear to impact behavior, especially in boys.

“There is definitely communication between bacteria in the gut and the brain, but we don’t know which one starts the conversation,” says study co-author Dr. Michael Bailey.

“Maybe kids who are more outgoing have fewer stress hormones impacting their gut than shy kids. Or maybe the bacteria are helping mitigate the production of stress hormones when the child encounters something new. It could be a combination of both,” says Bailey.

Bailey and his team at The Ohio State University examined stool samples from 77 children. They found kids with the most diversity in their intestinal microbes were more often engaged in behaviors linked to things like positive mood, curiosity, sociability and impulsivity.

Curiously, extroverted and adventurous personality traits were linked to the presence of certain bacteria in boys only.

The link between gut bacteria and the brain is more consistent in boy children. But, even among the girls in the study, there were some associations between the intestinal microbiome and behavior.

Self-restraint and cuddliness were associated with a lower diversity of gut bacteria, while girls with an abundance of a certain kind of bacteria (Rikenellaceae) appeared to be more fearful than their peers with a more diverse gut microbiome.

Further research backs up Bailey’s comments about the link between gut bacteria and the brain. A more recent study published in the journal Gut Microbes found a connection between the gut microbiome and brain metabolites of infant pigs, whose brain structures are similar to human babies.

Despite these studies and others, we don’t yet know exactly how the gut microbiome influences human behavior—just that there’s a link. For that reason, scientists aren’t suggesting parents attempt to change their children’s microbiome in any way.

Every person has a different bacterial situation going on in their digestive system, and the perfect gut microbiome probably varies from individual to individual.

Much of the science is still out, but if your toddler boy is being particularly boisterous, it may indeed have something to do with his gut.