added loading of images and selecting of images