continue image->doc refactor