initial rbtree implementation