function group to groupUsers