changed avg to mean