added rescue for caching