modify script.rb to work