Working modified matrix