add mean and standard deviation calculation.