fix quicksort + tests