use provided stdev function