fixed primeFactorization