add groupby spec