update rbtree codes and testing is good