fixed the main.cpp as well