- separate logic of images. refactor