added code for quicksort animation