write and read data SYNC