altered main.cpp