set range in groupby phase