modified QuickSort. for some reason low < high was written twice