added chapter 6, first portion, chapter6.rb