Closes #3. Calculates Median.