findFactors function

Find factors