Adding functionality to Binary Search Tree