update main.cpp for comments and main method