added code for computing standard deviation and mean