added an add match function and associated test for exchange graphs