added the image processing