Initial commit of chapter 6 code