Improved cfg