added preload of images, another approach