optimized caching. fixed search