Update MatrixFactory.java