added code - ex5.rb