store images in a temp variable