Lecture examples for chapter 8