integrated rewrap into rmdup (untested)