implement merge_sort with tests