Update algorithm2CGS