Added the codes for exercise 8.1