code ex. 1.22