added search code