updated QuickSort so it actually works