Match and write