Updated exercise3.rb