added update method for image