codes for  binary search tree