additional work on main.cpp