refinement: terrain code.