normal quicksort implementation