Added function to calculate average, minimum and maximum temperature