fixing bug in is_prime, wasn't advancing candidate divisors