changing to factor graph arch