Using 2x2 rectangles

Added if statement to write less images to save time