Solution for problem 60.
Added caching.