Update to new render function