correct _update_rule_for_states function
update tests for _update_rule_for_states