Added MergeSort function