trap all rules to the main block