adding images and updating index