chapter 3.18: exercise 2. switched to using the let function