Updated examples for chapter 6