reorganize cfg