update the view model