#3 Adding support for hierarchical rules