modified search logic.