modified matrix