modify write and read of TDR