refactor earth