update with quick sort