modified main.rb