quick and merge sort