Solved Problem 86 in 126 seconds, needs refactor