add pair graph