Completing Problem 5, needs refactoring