merge sort, needs debugging