Cockroaches can communicate using their feces, according to a new study. Researchers studying roach aggregation behaviors found that compounds produced by bacteria in the gut of roaches help bring the insects together. The findings, published in Proceedings of the National Academy of Sciences this week, suggest that microbial communities in the gut may play a role in insect-to-insect communication.

The German cockroach (Blattella germanica) is a major pest that transmits pathogens, contaminates food, and makes us sick. They live in aggregations, and contact with each other speeds up the development of their young (called nymphs) as well as the reproductive maturation of both sexes. These gatherings also help them locate mates, avoid predators, thermoregulate, and prevent water loss. Their communication is mediated by chemical cues (like pheromones), which can be produced by the roach itself or by gut bacteria acquired through its diet.

To better understand so-called fecal aggregation pheromones, a team led by North Carolina State Universitys Ayako Wada-Katsumata and Coby Schal conducted a series of experiments with a strain of German cockroaches originally collected in an apartment in Florida more than six decades ago.Using chemical analyses of fecal extract, the team identified 40 highly attractive compounds called volatile carboxylic acids (VCAs), which elicit aggregations. Feces from sterilized roaches raised in germ-free environments so they have no gut microbes lacked 12 of these fecal VCAs altogether, and another 24 were present at low levels only.

Feces from microbe-free roaches failed to elicit aggregation behavior, and nymphs in particular strongly preferred normal feces to that of roaches without gut microbes. That means gut microbes contribute to the production of VCAs that act as fecal aggregation agents.The team then cultured, isolated, and identified bacteria from roach feces. When they offered these bacteria to microbe-free roaches, their feces prompted aggregations again. A mix of six bacteria in particular was more effective than just single bacterial isolates.

So what about that old saying, “never shit where you sleep”? Insects have all sorts of strategies to get rid of feces, such as dropping it from leaves, burying it, or covering it in silk, Schal explains to IFLScience. These strategies are mainly to avoid microbial growth in very humid conditions (for ants, termites, and other social insects) or get rid of cues that predators and parasitoids can use to locate them (for insects that live outdoors). “Cockroaches literally live on their feces,” he adds. They even eat it when they’re young.