Endostyle

The endostyle is an anatomical feature found in invertebrate chordates and larval lampreys. It is an organ which assists chordates in filter-feeding. It is found in adult urochordates and cephalochordates, as well as in the larvae of the vertebrate lampreys, but has been transformed through evolutionary time into the thyroid in all other vertebrates. Since the endostyle is found in all three branches of chordates, it is presumed to have arisen in the common ancestor of these taxa, along with a shift to internal feeding for extracting suspended food from the water.
The endostyle is found in the pharynx. The food particles suspended in the water adhere to the mucus it produces. The filtered water is expelled through the gill slits, while the food and mucus is then passed, by the sweeping movement of cilia that coats the endostyle, through the pharynx of the organism and into the esophagus. 
The endostyle in larval lampreys (ammocoetes) metamorphoses into the thyroid gland in adults, and is regarded as being homologous to the thyroid gland in vertebrates due to its iodine-concentrating activity.