The annelids, or segmented worms, are a large phylum of over 22,000 species including ragworms, earthworms, and leeches. They exist in various environments from marine to freshwater to terrestrial. The annelids have a simple but well-developed nervous system. In earthworms, the central nervous system consists of a nerve ring around the pharynx containing fused supra-pharyngeal ganglia that form a primitive brain, along with a ventral nerve cord running through each body segment. The peripheral and autonomic nervous systems connect the central nervous system to the rest of the body and regulate the earthworm's activities.