Main.cpp modified a little