code refactor in group info dialog