changed nrows and ncols