demo in chapter 5