self modifying binary search tree class