Simple solution for problem 14 done, will try a caching solution for a speed up after this