example.rb(chpt 5.4) updated to have full answer now. Whoops.