refactoring render_sys