cleaned up main.py