DRY'd up ch01.rb