modified some write way.