add findFactors method