working loop of images