array size is set depending on group size