main.cpp file updated