solution of exercise 1.7
solution of exercise 1-8