refactor group creation scripts

1 job for master in 3 minutes and 37 seconds (queued for 9 seconds)