getting the average