Added 2 utility functions for terrains