completed dn rewrite