The formation of the earth