Replace readData/writeData with read/write