refactored getView()