new inference function and rulesets