tweak to RuleFunction template.