remove unique elements from a list