render refactor