Lecture examples for chapter 18