quicksort stuff from school