added search related code