Provided a solution to Problem #7.