Create addRedBlackTree function and ErroCode function