The alveoli (microscopic air sacs) in the lungs are adapted to maximize gas exchange - the membrane is thin and the blood capillaries are close to the membrane, so the distance for diffusion of gases is very small. There is also a large amount of carbon dioxide in the bloodaround the alveoli and a large amount of oxygen inside the alveolus, so the concentration gradient encourages oxygen to diffuse in and the carbon dioxide to diffuse out. There are also millions of alveoli in the lungs, which gives the lungs a large surface area for diffusion and a large capacity for air.