Resolving exercise 20