rules_to_commands() added