Earthworms are segmented invertebrates that reproduce both asexually through regeneration and fragmentation, and sexually. They are hermaphroditic, containing both male and female organs, and fertilize their eggs internally before depositing them in cocoons. The cocoons hatch after 2-3 weeks to release 4 worms on average. Earthworms have a nervous system segmented along their body, with ganglia at each segment controlling that region, and various sensory receptors along their skin. They are scavengers that feed on dead organic matter in soil and pass nutrients through their digestive systems.