Update factorization.cpp