timing, cleaned up main.py