Refactoru chapter 21 to 14