adding optimized search