improves visualize_images format