finish example of chapter 6