some small changes in main.cpp