need to care about the number of rules too