solved exercise 1.27