hash now handles collisions