all in main.cpp