replaced the RuleTransformer with our own implementation