adding merge sort algorithm