added chi-calculation for m-calculation by tns-contraction