Added a real simple loop; only tested for 3 images so far