replace render_mode statement