added ex39.rb