Update main.cpp

comments for better understanding