modified the image uploader