add caching for search