Adding problem #5 solution.