updates the view