Solution to exercise 3-4