turned is_prime into an actual function.