view rendering refactoring