refactor RedBlackTree & Dictionary