modified matrix file