partial bootstrap rewrite