finished the is_prime function