working on implementation of simple cfg