Solution for exercise 26-4