rem_dup written