rewrote averages