Updated exercise2.rb