change _view to a factory