improve 'is_prime' method
complete p10