added lexicographic secondary compariosn for hash collisions