Added testing method for prime factorization