added an update method to the view