Correct version of MergeSort