Added a factorization alg implementation