debugging rule-based