How does photosynthesis balance the oxygen and carbon dioxide level in the atmosphere?