add merge sort implementation