work on BST