update main.cpp and run.rb