Updated stdDev method