merging changes in BST