reversed order of main.py bottom code
fixes