removing unused variables from SearchRoot()