Completed with quick sort