updated core logic.
implemented rules_allow().