<Tr> <Th> FMA </Th> <Td> 7158 </Td> </Tr> <Tr> <Td_colspan="2"> Anatomical terminology (edit on Wikidata) </Td> </Tr> <P> The respiratory system (also respiratory apparatus, ventilatory system) is a biological system consisting of specific organs and structures used for gas exchange in animals and plants . The anatomy and physiology that make this happen varies greatly, depending on the size of the organism, the environment in which it lives and its evolutionary history . In land animals the respiratory surface is internalized as linings of the lungs . Gas exchange in the lungs occurs in millions of small air sacs called alveoli in mammals and reptiles, but atria in birds . These microscopic air sacs have a very rich blood supply, thus bringing the air into close contact with the blood . These air sacs communicate with the external environment via a system of airways, or hollow tubes, of which the largest is the trachea, which branches in the middle of the chest into the two main bronchi . These enter the lungs where they branch into progressively narrower secondary and tertiary bronchi that branch into numerous smaller tubes, the bronchioles . In birds the bronchioles are termed parabronchi . It is the bronchioles, or parabronchi that generally open into the microscopic alveoli in mammals and atria in birds . Air has to be pumped from the environment into the alveoli or atria by the process of breathing which involves the muscles of respiration . </P> <P> In most fish, and a number of other aquatic animals (both vertebrates and invertebrates) the respiratory system consists of gills, which are either partially or completely external organs, bathed in the watery environment . This water flows over the gills by a variety of active or passive means . Gas exchange takes place in the gills which consist of thin or very flat filaments and lammelae which expose a very large surface area of highly vascularized tissue to the water . </P>

What are some functions of the respiratory system
find me the text answering this question