Implement chapter 9 challenges