added saving as an image