refactor group analyzer