Second part of challenge from chapter 12.