updates input image