added code to reset image