removes the duplicate without preserving the order