finalizing search