last step of merge