return rules in findRules function