improved caching solution for problem 14. 15x speed improvement