added extra fields to grouping