refactor Renderer