Code for exercise 8