solution for exercise 1.16
solution for exercise 1.17