added problem8.rb