Calculating the Median and Mode