refacured Renderer::render method