update whole match procedure