writing over duplicates