add check for distinct hash values