name it "mu" instead of "median" to be consistent with other implementations.

Also cut at the index of median instead of comparing values.
Since that's how median supposed to work.