initial code for merge sort implementation