correct and add functions

Corrected: 
_update_rule_for_state
set_rule_for_states

Added:
get_rule_for_states