Added function for average elevation