Exercise 3-8 (Refactoring Finished)