Moved group creation inside the loop