added prime factorization