added Stats class to calculate mean, stdev, median