added new version of hash unique characters algorithm