adding rewrite