restructure BST