calculating mean of many numbers