Added the codes for exercise 6.2