use nextsamehash to improve linear probing while key not found in hashtable