added looping into separate image file, not just 1x1 rectangles