The Earth's atmospheric oxygen increased because plants and algae developed and used carbon dioxide for photosynthesis. This led to a decrease in atmospheric carbon dioxide levels. The origins of the oceans came about as a consequence of rapid cooling of water vapour. This led to a decrease in carbon dioxide as oceans absorbed this gas. Additionally, carbon dioxide was "locked up" in carbonate rocks. The advent of continental formation, namely a supercontinent, Pangaea, caused a reduction in the numbers of active volcanoes. Finally, nitrogen formed because ammonia in the Earth’s early atmosphere reacted with oxygen.