added string trimming for group names.