Plastic is fantastic. It’s cheap, durable, and doesn’t react to the usual organisms that break down organic matter. This has made it incredibly useful for the packaging industry, but has also led to mountains of waste, like the trillion plastic bags dumped in landfills annually. Now, though, the fight against plastic might have an unexpected ally: a type caterpillar called the wax worm that loves to chow down on plastic bags.

The discovery of the wax worm’s previously unknown diet was made accidentally by Spanish researcher, Federica Bertocchini. Bertocchini is a part-time beekeeper, and is used to removing wax worms from her hives, where the caterpillars like to munch on the beeswax inside. After leaving a recently evicted troupe of wax worms in a plastic bag one day, Bertocchini found that the critters had munched their way to freedom.

The caterpillars can chew holes in a plastic bag in less than an hour

Bertocchini was curious as to whether the centimeter-long wax worms were actively digesting the bag’s plastic, or just chewing through it. She confirmed that they were, by mashing the creatures into a paste and applying it to a plastic film, which slowly degraded. She then teamed up with researchers from the University of Cambridge to analyze the worm paste and was able to confirm her findings. The resulting study was published in Current Biology.

Bertocchini thinks that the caterpillar’s digestive feat might be because of structural similarities between plastic and the wax that constitutes part of their usual diet. The next step is to find out whether this discovery can be put to any use. It’s not the first time we’ve found organisms capable of breaking down plastic (although the wax worms work faster than most), and some scientists have their doubts.

Ramani Narayan, a researcher from Michigan State University who studies how to degrade various plastics, told The Atlantic that using wax worms to recycle on an industrial scale might just create new problems. Chewing up plastics could create small fragments that “pick up toxins like a sponge, transport these toxins up the food chain, and can cause harm to the environment and human health,” said Naryan.

But Bertocchini says the next step isn’t to use the wax worms themselves, but to find the enzyme in their digestive systems that’s being used to break up the plastic in the first place. If scientist could isolate that, it could be used as a treatment in landfills. That would certainly be easier than dealing with millions of wriggly caterpillars.