Resolving exercise 19