added has unique characters algorithm