Partially completed exercise 7.