support for multiple subgroups