updated ex11.rb