generateRules() method written