chapter 4 implementation