runCFG and the functions related to it were coded