oxygen and carbon dioxide are exchanged in the lungs by