brought main.py up to date