adding groupby to import