Added standard deviation calculation.