Exercises 7 and 8.
started exercise 9