modify main.cpp, remove discarded code