Added rewrite script