modified quicksort binary