changes to main.cpp