cleaning the image