refactorize images from variables to objects