closures for keeping track of collisions; re-hashing on a collision