merge sort revised