finish quick sort