groupby - re-implement old behaviour