update terrain refactoring