make struct for rules