solve exercise 12.1