solve exercise 2.4