Update main.cpp

modify code at github