reuse matrix in Precalculate