Rewire the render.py codes