finished chapter 6, chapter6.rb