Add generalized matching