remove unnecessary rbtree.