mergeSort boiletplate