use factorization module for problem 12