Working through map with hash table with rehashing function