minimize the code of addRedBlackTree