refactor group class