Added answer to problem 2.