solution to exercise 43