Ventilation is the process of moving air in and out of the lungs. This is brought about by pressure changes in the thoracic cavity. During inspiration, the diaphragm contracts causing it to flatten and move down. This also displaces the organs below. The external intercostal muscles contract causing the rib cage to move up and out. This results in the volume of the thorax increasing and thus the pressure inside the thorax decreases below that of atmospheric pressure. This allows air to move from higher pressure outside to the lower pressure inside the thorax into the lungs. During expiration, the diaphragm relaxes and the displaced organs return to their normal positions. The external intercostal muscles relax, causing the ribcage to move down and in. This causes the volume of the thorax to decrease, thus increasing intrathoracic pressure above that of atmospheric pressure. Air moves out of the lungs. However, during forced expiration (such as when exercising of coughing), the internal intercostal muscles contract, forcing the ribcage to move down and in. The external and internal intercostal muscles work in an antagonistic fashion.