group refactor