fixing bug that prevented caching; now caches across requests