completed 1st exercise in chapter 8