added data method for converting image to string