Median

here's the median function