update median comp

half - 1, not + 1