only opens the images once == more efficient