fixed formula in avg