The excretory system is responsible for removing waste products from an organism. It also plays a vital role in regulating the water and salt balance in the organism. Many animals, such as sponges, jellyfish, tapeworms, and other small organisms, do not have distinct excretory organs. Rather, they rid their bodies of waste through diffusion. Larger, more complex animals require specialized, often tubular, organs to rid their bodies of waste. For example, flatworms such as planarians have tubules that collect wastes and expel them to the outside via pores. Segmented worms such as earthworms have nephridia (tubules with a ciliated opening) in each segment. Fluid from the body cavity is propelled through the nephridia, and wastes are expelled through a pore to the outside while certain substances are reabsorbed. In addition, insects have a unique excretory system that consists of Malpighian tubules: Waste products enter the Malpighian tubes from the body cavity, then water and other useful substances are reabsorbed while uric acid passes out of the body.