interactive duplicate remove function