implemented terrain mapping