move fn rows to Matrix<T>