added largestPrimeFactor