Make ngroups param configurable