Updated problem 13 solution