Function findAverage()