implement render in main.py