added $update to update the view model