reviewed main.cpp

reviewed main.cpp