render refactoring