rewrite findDivisor