Chapter 5 code homework