Added a depth parameter to the structure of BST