fixed median(l)

AND THERE WAS MUCH REJOICING (i'm a moron)