handle order of running median