refactor work image waterfall logic