Added exercise 2 to code