small change in is_prime