completed merge sort.