group num function