update Write function
update Write function
Merge branches 'temp' and 'master'