write template