solved exercise 1.11