finished quick sort