remove duplicate characters from string