moves all the images and makes necessary changes