BST class