Adding problem #7 solution.