Re-wrote quicksort - remember j should be length - 1