added prime factorization solution