updated main.cpp again