changed main.cc