minor
scala does groupby