fix seasrch function