matrix rehash