remove unnecessary code in main.cpp