modified the agent so that rules can be specified in Rules.pm