added exercise29.rb