refreshed main.py