main.cpp edited