refactored names of variables in quicksort