mergeSort Logic