Finding rare animals is hard. Finding their poop is easier. And finding other animals that have already eaten the poop is barely a challenge at all.

Case in point: the dung beetle. Famous for its poop-eating and sometimes rolling abilities, the dung beetle is like a collection machine for the DNA of animals in the area. Feces contains DNA from the animals they come from, so finding droppings can be a useful way to identify creatures that might hide from humans.

But finding droppings can be challenging, which is why scientists have found other ways to collect bits of animal DNA: look at the organisms that eat bits of other animals. Carrion-eating flies and leeches both get DNA bits directly from the mammals they feed on via flesh and blood respectively. Dung beetles aren’t interacting with mammals directly, but they do eat a wide variety of droppings.

Researchers working in Swaziland reasoned that the DNA present in animal droppings might also survive being eaten by dung beetles. And they were right. The beetle intestines were filled with different types of poop, each with DNA fragments left over from the mammals in the surrounding area. Using high-throughput sequencing, the scientists could compare the DNA from the beetles to the DNA of known animals and determine which mammals were nearby.

Dung beetles, unlike droppings, move around their local habitat and are easy to catch. And with high-throughput sequencing, the whole process doesn’t take very long, especially compared to how lengthy most conservation surveys are. This study, posted on bioRxiv, only used 10 beetles to demonstrate the method and was able to identify multiple species in the area, including humans. A larger sample size could yield even more results.

Now scientists could have the option to stay in one place and just collect hundreds of dung beetles instead of seeking out feces. And without all that trekking through the savannah, maybe they won’t be so pooped.