remove duplicates from strings