add gear.rb from chapter 2, page 19