Added completed Problem 5 solution