Lecture examples for chapter 5