select middle number as the pivot