The water vapor slowly condensed and its quantity was augmented by the presence of ice-cold comets. The vapors that accumulated in the atmosphere cooled down the Earth’s molten exterior. This led to the formation of oceans. The volcanoes also replenished the atmosphere with carbon dioxide and nitrogen.