added bst subtree algorithm