added image support
refactor