Add chapter 5 exercise code