add functions to construct cfgs