Adding more functionality to binary search tree