implement write
delete wrap template