changed to only search until a different hash