working on BST