Further adjustments for createGroup function.