Finished quick sort