refactoring cfg analyzer