Which gas played a critical role in forming the earth primitive atmosphere