apis for binary search tree