added groupby and reduces to iter