got the median to work for odd numbers