create groups first