refactor group index