Updated main.py to explain the complexity