correction of average computation