adding exercise2.rb