solved exercise 1.24