re-implemented terrain generation