Refactor Problem 12
Refactor Problem 13