Refactor with exercises chapter 5