finalise matching