Added the ability to divide the group into three subgroups