exercise 1.5 code