Update main.py

Added some explanation to understand codes better.