Tapeworms might not be the cutest or cuddliest of creatures cooked up by Mother Nature, but what they lack in charm, they more than make up for with a few very special abilities. You see, tapeworms have the incredible power to shed and then regrow huge lengths of their own bodies, and it’s an ability that scientists haven’t been able to fully explain.

Now, new research published in eLife reveals the very special cells that give tapeworms the capacity to generate new bodies. To figure it out, scientists led by Tania Rozario of the University of Wisconsin-Madison had to chop some of the parasites up.

The researchers first had to determine what specific parts of a tapeworm’s body are capable of regeneration. Tapeworms grow in segments, and while some parts of the worms can act as seeds to grow an entirely new body, others cannot.

“We know that tapeworm regeneration is likely to involve stem cells, but up until now their potential to regenerate has never been comprehensively studied,” Rozario, lead author of the work, said in a statement. “In this study, we explored which parts of the tapeworm are able to regenerate and how this regeneration is driven by stem cells.”

When a tapeworm’s head was sliced off, the body would continue to grow but failed to generate new segments. A worm with both its head and neck intact, however, can regrow its body.

It was thought that stem cells located in the neck of the tapeworms are the key to their regenerative powers, but it turns out these cells are present throughout the bodies of the worms and are not isolated in the neck region. Additional testing revealed that while the cells are present elsewhere in the body of the worms, they could not be activated without the neck portion of the worm left intact.

So, the bodies of the worms have the “hardware” for regeneration by default, but it’s the signals moving from the head and neck that trigger act as a command for that regeneration to begin. It’s a rather interesting discovery about a creature that none of us ever want to have to see.