refactored the controller calls to the view handler