thread state throught rewrite