pass $ruleset instead of $rule