Add exercise 2 code.