remove duplicates in a string