moved rules to separate file