The worm lost its back legs and built itself a tube to live in instead:
Facivermis yunnanicus was a worm-like creature from the Cambrian period, when the first complex animals evolved in the seas. It was under 10 centimetres long and had five pairs of spiny legs on its front half, while its rear end was swollen.Michael Marshall, “Weird worm is earliest known animal to evolve away body parts” at New Scientist
Paper. (open access)
So yunnanicus started out more complex and evolved to be LESS complex. Maybe Darwinism can explain that more easily than it can explain most evolution because we are looking at a loss of information.
See also: Devolution: Getting back to the simple life