add some write function