tested calculation of average and stdev