rewrite base