done with quick sort