now accurately updates the average.