update the view to show correct data