replacing group creation with check