refactor!
finished Chapter 8