added caching for API requests