redo changes for last condition refactor migration