Modified avg to sum.