Exercise 8 Working towards Assignment 4