updated stdDeviation method