tested quick sort and merge sort