added bst merging