Updated how the rules are defined