Lecture examples for chapter 2