added prime factorization method