added group creation function