HttpHandler getGroupChunk method, refactoring