just computeAverage remained unchanged