added isPrime & getPrimeFactors