TMS: refactor before RW