Quicksort working code