same in main.cpp