change group to group_by