similarity test rehashed