add comments for main.cpp