changed rewrite base