handle the merge