added merge sort algorithm