grouping users by variable