added inheritance for tree and redblacktree