code for findDivisors()