Saving before editing downsample_submatrix function