Exhalation is the movement of air out of the lungs. The external intercostal muscles relax and the internal ones contract, pulling the ribcage downwards and inwards. Simultaneously, the diaphragm relaxes and domes, pushing up on the lungs. The contraction and relaxation of these muscles decrease the volume of the thoracic cavity and thus increase the pressure so that it is higher within the thorax than the external environment, causing air to be forced out from the lungs into the environment. Exhalation can be voluntary or involuntary, the latter being controlled by respiratory controllers in the medulla oblongata and the pons. The main purpose of exhalation is to expel carbon dioxde, a waste product of aerobic respiration. Coupled with inhalation, the two processes comprise ventilation.