Completed part7.rb