assign subgroups