calculating the mean average of a set of numbers