Problem 5 solved, not refactored