Changed to calculate the mean and MPV at the same time