search not found logic modified