A study of the sanitary practices of black garden ants shows they’ve adopted habits many parents of 2-year-olds would kill for: Not only are the tiny critters toilet-trained, they also take out their own trash.

The study, published in PLOS One and entitled “Nest Etiquette: Where Ants Go When Nature Calls,” found that ants are extremely advanced in all matters related to personal and communal hygiene. The industrious, six-legged arthropods have an extremely complex system of waste management involving tidy indoor areas dedicated entirely for fecal matter and a separate “kitchen midden” outside the nest for other kinds of refuse. They were also found to repurpose some kinds of waste as construction material for their homes, which frankly makes Bill Gates’s whole poop water shtick seem tame.

According to the study’s authors, sanitary behavior is an under-studied field in biology. (Gee, we wonder why.) But understanding how ants and other animals deal with their, ahem, business is crucial to scientists who study how social species manage waste and prevent disease outbreak in crowded communities.

Lead author Tomer Czaczkes, a biologist at the University of Regensburg in Germany, told the Los Angeles Times he had been working with ants for several years when he became interested in their pooping patterns. While conducting research for another study, Czaczkes noticed several brown patches in corners of the white plaster nests he had built for his subjects. He had a pretty good idea of what the patches were, but a scientist never assumes.

So Czaczkes and his colleagues constructed 21 fake nests for a couple hundred Lasius niger specimens and began spiking their sugar water with blue and red food dye. Within two months, brightly colored patches appeared in the nests, signaling the locations of each ant’s toilet. The toilets were almost always tucked of the way in the corners of the nests (it’s not the kind of thing you’d want to have out in the open for anyone to trip over) and they exclusively contained feces.

Meanwhile, all other kinds of waste (food leftovers, nest debris, etc.) were taken outside and deposited in “midden heaps.” The corpses of nest mates — which could pose a health threat to the ant colony — were also discarded away from the nest.

This behavior baffled researchers, who couldn’t understand why the ants would defecate indoors but remove all other kinds of trash from their living area. Though the ants restricted their toilets to corners, they didn’t actively avoid those areas. And they pooped in their own living space even when there were unoccupied rooms in the colony, suggesting that the indoor toilets weren’t caused by overcrowding. Perhaps ant poop doesn’t pose a hygiene threat the way human feces do?

“If this feces was very dangerous stuff, they’d presumably get rid of it,” Czaczkes told the L.A. Times.

The study proposed several explanations for the behavior. The ants could be using the indoor toilets out of laziness or to avoid the dangerous outdoors, where predators and other threats might lurk. They could also be using the piles of feces as fertilizer on which to grow fungus for food — the gross, buggy equivalent of a kitchen garden.

Figuring out which explanation is the right one will take more study, Czaczkes said. In the meantime, he cautioned against likening ants to humans.

“We must be careful not to anthropomorphize,” he told National Geographic. “They are not tidy because it brings them satisfaction, but rather because there must be a selective advantage to being so.”