added inv_sqrt_mat