adding state compare by group