added find the median