[fix] optimized search function