added code - ex3.rb