completed exercise 3, ch 6