Added flipImages()