workiong on bst class