think i finished the merge-sort function