adding workings of exercise 1.10