internal impl of group_size. closes #65