updated some of main.cpp