Refactoring chapter 4 putting it all together