Tws rewrite