Update matching.cpp