modify write and read