Modification to work with images