added the terrain change code