reverted main.cc changes