added remove repeated chsrs in strings function