refactoring render view