adding ngroups