update search code