added quicksort methods and choosePivot