update the quick sort