added ex5.rb