Learn basics
See demo
Build your agent
Apply in clinic
Live Workshop · No tech background needed

AI for Doctors.
Build Your First
Agent.

👩‍⚕️
👨‍⚕️
👩‍⚕️

Used in clinics to reduce front desk load

375 visitors
AI for Everyone — Clinical Agent

Patient Input

Agent receives patient intake

Patient: John D., 58M. Chest pain x 2 hrs, radiating to left arm. Hx: HTN, DM2. BP 158/94.
The Real Cost of Manual Workflows

Your clinic is losing time, staff, and money
every single day.

These aren't edge cases. They're the daily reality for most practices — and AI agents can fix all three.

3–4 hrs

Admin Overload

Doctors spend 3–4 hours daily on documentation, intake forms, and prior authorizations — time that should go to patients.

"I finished my last note at 9 PM again." — Primary Care Physician
62%

Staff Burnout

62% of front desk staff report burnout from repetitive scheduling, insurance verification, and follow-up calls.

"We lost two MAs this quarter. Can't keep up." — Clinic Manager
$125K

Missed Revenue

The average clinic loses $125K/year to missed follow-ups, uncollected copays, and denied claims that could be caught automatically.

"Our denial rate is 18%. Industry average is 5%." — Billing Director

AI agents can handle all of this.

Show me how

The 12 Concepts Every HealthcareProfessional Should Know

Tap each card to flip it and reveal the full explanation with healthcare examples. Master all 12 to understand how AI works in clinical settings.

Tap any card to flip it
🧠

Model

The AI brain that reads and generates text.

Tap to explore
🧠

Model

A model is a large neural network trained on billions of words from the internet, books, and scientific papers. It learns patterns in language so well that it can answer questions, write documents, summarize data, and reason through complex problems. Think of it like a very well-read consultant available 24/7.

🏥 Healthcare: GPT-4 or Claude reading a patient intake form and drafting a visit summary in seconds — the same way a resident reviews notes before the attending walks in.
🔤

Token

The smallest unit of text the AI reads.

Tap to explore
🔤

Token

Tokens are the pieces AI splits text into before reading it. A token is roughly 4 characters or 3/4 of a word. The sentence 'Hello, how are you?' is about 5 tokens. AI models have limits on how many tokens they can process at once — this is the context window.

🏥 Healthcare: A 3-page discharge summary is about 1,500 tokens. A full clinical note with vitals, labs, and assessment might be 800 tokens. Knowing this helps you fit the right amount of context into the AI's window.
✍️

Prompt

The instructions you give to the AI.

Tap to explore
✍️

Prompt

A prompt is any text you send to an AI model to get a response. Great prompts have four parts: Role (who the AI should be), Task (what to do), Context (background information), and Format (how to structure the output). Better prompts produce dramatically better results.

🏥 Healthcare: Instead of 'summarize this note', say: 'You are a clinical documentation specialist. Summarize this progress note in SOAP format for a cardiologist handoff. Focus on medications, vitals, and assessment. Keep it under 200 words.'
📋

Context Window

The AI's working memory — everything it can see at once.

Tap to explore
📋

Context Window

The context window is the maximum amount of text (measured in tokens) an AI can process in a single interaction. It includes your prompt, the conversation history, and the AI's response. When the context fills up, older messages are forgotten. Modern models have windows from 8K to 200K tokens.

🏥 Healthcare: A 30-minute patient interview transcript is ~5,000 tokens. Claude's 200K context window can hold the equivalent of an entire patient chart — history, labs, notes, and your questions — all at once.
🗺️

Embeddings

Numbers that capture the meaning of words.

Tap to explore
🗺️

Embeddings

Embeddings convert text into lists of numbers (vectors) that represent meaning. Words or sentences with similar meanings end up close together in this mathematical space. This allows AI to find related content even when the exact words don't match — powering semantic search and retrieval systems.

🏥 Healthcare: A patient asks 'my chest feels tight'. Using embeddings, the system finds relevant records about 'chest pain', 'angina', and 'cardiac symptoms' — even without the exact words matching.
💾

Memory

How AI remembers information across conversations.

Tap to explore
💾

Memory

By default, AI has no memory between conversations. But memory can be added in four ways: no memory (every session is fresh), session memory (remembers within one conversation), long-term memory (stores and retrieves past information), and tool-backed memory (reads from databases, EHRs, or files).

🏥 Healthcare: A clinic scheduling assistant with long-term memory knows Mrs. Johnson always prefers Tuesday mornings, is allergic to penicillin, and saw Dr. Patel last time — without being told again.

LLM

Large Language Model — the technology behind ChatGPT and Claude.

Tap to explore

LLM

LLM stands for Large Language Model. These are AI systems trained on massive amounts of text using transformer architecture. They predict the most likely next token given previous tokens. Despite this simple mechanism, LLMs demonstrate remarkable reasoning, coding, writing, and analysis abilities.

🏥 Healthcare: When you type a clinical question into an AI-powered EHR copilot, an LLM processes your query, considers the context of the chart, and generates a relevant suggestion — all in under 2 seconds.
💬

Chatbot vs Agent

Chatbots reply. Agents plan, act, and complete tasks.

Tap to explore
💬

Chatbot vs Agent

A chatbot takes a question and returns an answer — one step, then done. An agent can plan multiple steps, use tools (search, database, calculator), loop back if something goes wrong, and complete a complex task autonomously. Agents are chatbots with superpowers: memory, tools, and the ability to take actions in the world.

🏥 Healthcare: A chatbot answers 'What are office hours?' An agent books your appointment: checks availability, sends a confirmation text, adds to the EHR schedule, and follows up if you don't confirm.
🤖

Agent

An AI that can plan, use tools, and complete multi-step tasks.

Tap to explore
🤖

Agent

An AI agent is a system that perceives its environment, reasons about goals, plans a sequence of actions, executes tools, observes results, and adapts until the task is complete. Unlike chatbots, agents can take actions: search the web, query a database, send emails, fill forms, or call APIs.

🏥 Healthcare: A prior authorization agent: receives the request, looks up patient eligibility, matches diagnosis codes to payer criteria, drafts the appeal letter, submits to the payer portal, and pings the care coordinator when approved.
🔧

Tools

Functions the AI can call to interact with the real world.

Tap to explore
🔧

Tools

Tools are functions that an AI agent can invoke to take actions beyond just generating text. Common tools include: web search, database queries, calculator, file reader, calendar API, email sender, and form filler. Tools are what transform a chatbot into an agent capable of completing real tasks.

🏥 Healthcare: An AI clinical assistant might have tools: [search_clinical_guidelines], [check_drug_interactions], [pull_patient_labs], [draft_prior_auth], [send_referral_fax]. Each tool does one specific job reliably.

Skills

Reusable AI prompt templates for specific tasks.

Tap to explore

Skills

Skills are pre-built, tested prompt templates that an agent can deploy for specific tasks. A skill bundles together the role, instructions, format, and examples needed for one job. Think of skills as the AI's job description cards — each one tells it exactly how to handle a particular situation.

🏥 Healthcare: Skills in a clinic AI: [SOAP_Note_Writer], [Patient_Education_Generator], [Insurance_Denial_Appealer], [Appointment_Reminder_Sender], [Referral_Summary_Creator]. Each skill has been tested and approved for its specific purpose.
🔄

Workflow

A step-by-step blueprint connecting agents, tools, and skills.

Tap to explore
🔄

Workflow

A workflow is a defined sequence of steps: what data to gather, which tools to run, which agent handles each stage, what to do if something fails, and what the final output looks like. Workflows are written in plain language or code and are the SOPs of your AI system — they make AI behavior predictable and auditable.

🏥 Healthcare: Patient Intake Workflow: (1) Patient fills form → (2) AI extracts demographics → (3) Insurance verified via API → (4) Prior conditions flagged → (5) Appointment scheduled → (6) Welcome message sent → (7) Chart prepped for provider.
Foundation → Interaction → Technical → Application

Ready to build your first clinical agent?

Start Workshop
Video Lessons

Learn AI in 60 Seconds

Bite-sized explainers on AI concepts — built specifically for healthcare professionals. No jargon, no fluff.

Playlist refreshed Apr 19, 07:18 AM
Gemma 4  The Local AI Revolution -Own your stack
Short
1:01

Gemma 4 The Local AI Revolution -Own your stack

Gemma 4 brings Apache 2.0 licensing and local first deployment into the mainstream. Smaller models fit edge devices. Larger models target co

Daily AI Briefing

AI News in 60 Seconds

One-liner headlines from TechCrunch, VentureBeat, MIT Tech Review, and Ars Technica — refreshed daily. No noise, just signal.

Updated today at 7:18 AM

Word of the Day

Agents

AI Agents

AI agents are autonomous programs designed to perform specific tasks, often by interacting with their environment, making decisions, and learning over time without constant human intervention.

Clinical Example

"A new clinical AI agent is being developed to autonomously monitor patient vital signs and alert healthcare providers to early signs of deterioration."

Trending Today

OpenAIAnthropicAIroboticshuman verificationAI chipenterprise AIrobotaxi
Build Your First Agent

Four prompts. One working agent.

Every healthcare AI agent starts with the same four building blocks. Click each card to see the exact prompt — then copy and paste it into Claude.

Step 1

Define Role

Give your agent a job title and a purpose.

See prompt →
Step 2

Add Rules

Tell it what it must never do.

See prompt →
Step 3

Define Input

What data does the agent receive?

See prompt →
Step 4

Define Output

What should the agent produce?

See prompt →

How this runs under the hood

Three layers work together every time your agent responds.

🧠
Claude
The brain

Reads your prompt + rules, reasons about the input, generates a structured response.

🗄️
Your system
The data

EHR, intake form, or patient message — the context Claude reasons over.

🔧
Tools
The actions

Code functions Claude can call: look up ICD-10, send a portal message, update a record.

Your systemClaude reasonsTool calledOutput returned

Now build yours — step by step

Use the 8-step framework below to design your own clinical agent.

Step 1 of 80% Complete
🎯
Step 1 of 8

Define the Goal

Every agent needs a single, clear objective. Vague goals produce vague agents.

Example:

Goal: Automatically handle patient appointment requests via text message and schedule them in the EHR without staff intervention.

💡 One agent, one primary goal💡 Write it in one sentence💡 Include who the user is and what success looks like
0/8 steps documented

🏗️ The WAT Framework

The WAT (Workflows–Agents–Tools) framework is how reliable healthcare AI systems are built. Probabilistic AI handles reasoning; deterministic code handles execution.

📋
Workflows
SOPs in plain language
🤖
Agents
Decision-makers (like you!)
🔧
Tools
Deterministic code scripts
Safe AI for Clinics

HIPAA compliance is not an add-on.
It's the foundation.

Every agent you build in this workshop follows these rules by default — so your patients' data stays protected.

HIPAA Compliant
BAA Available
SOC 2 Aligned
Audit Logs

What the agent CAN do

  • Summarize visit notes and generate SOAP drafts
  • Suggest ICD-10 and CPT codes from clinical text
  • Send appointment reminders via secure patient portal
  • Flag high-risk patients for priority follow-up
  • Answer general clinical questions from knowledge base

What the agent MUST refuse

  • Share full SSN, insurance ID, or date of birth
  • Send PHI over unencrypted SMS or email
  • Access records outside the treating care team
  • Store conversation history beyond the session
  • Make clinical decisions without physician review

How data is masked — live example

Request (raw EHR text)

Patient John Doe, DOB 04/12/1968, SSN 123-45-6789, MRN 00482910. Diagnosed with T2DM. Insurance: UnitedHealth #UHC-88421.

Agent response

⚠ I cannot share full identifiers due to privacy policy.

Full SSN, insurance IDs, and MRNs are protected identifiers under HIPAA. I can summarize clinical findings without exposing PHI.

Use this as a vendor scorecard: any AI vendor that cannot demonstrate PHI masking, provide a BAA, or show SOC 2 documentation is not ready for clinical use.

Pick a Workflow

See the difference AI makes
in your clinic today

Choose a workflow below to see a Before vs After comparison and the exact agent prompt that makes it happen.

Manual Intake

18 min
  • 1Patient fills paper form at front desk
  • 2MA manually enters data into EHR
  • 3Physician reviews before appointment
  • 4Clarification calls if info is missing
  • 5Insurance verified by phone

3 staff members, 18 minutes, frequent errors

AI Agent Intake

2 min
  • Patient texts symptoms to clinic number
  • Agent extracts structured data automatically
  • EHR pre-populated before patient arrives
  • Insurance verified in real-time via API
  • Physician briefed with SOAP draft ready

1 agent, 2 minutes, zero data entry errors

agent_prompt.txt — Intake workflow

Prompt

You are a clinical intake agent. A patient texts:
"Hi, I'm John, 58M. Chest pain since this morning, 
left arm too. I have diabetes and high blood pressure."

Extract: name, age, chief complaint, duration, 
associated symptoms, relevant history.
Format as structured intake for EHR.

Output

Click "Run Agent" to see output

Get your clinic agent — free for 2 months

Join doctors already using AI to cut admin time and reduce burnout.

Try free for 2 months

AI in Your Clinic Today

These are real workflow problems AI agents are solving right now in clinics and hospitals. Each case shows the AI concepts at work.

🛡️ All examples use fictional patient data. HIPAA-safe demo environment.
📋
Front Desk

Patient Intake Automation

15 min per patient

Front desk staff spend 15-20 minutes per patient manually collecting demographics, insurance, and chief complaint.

agenttoolsworkflowmemory

AI Solution

An AI agent collects patient info via text/web form, verifies insurance in real time, flags missing fields, and pre-populates the EHR chart before the patient arrives.

How It Works

1
Patient receives intake link via SMS
2
AI collects demographics and chief complaint
3
Insurance eligibility verified via API
4
Chart pre-populated in EHR
5
Provider alerted patient is ready

Tools Used

[form_parser][insurance_verify][ehr_write][text_sender]
📅
Scheduling

Intelligent Appointment Scheduling

4 phone calls per booking

Phone-tag for scheduling takes 3-5 calls per appointment. 30% of no-shows are due to poor communication.

agentmemorytoolschatbot
🛡️
Billing

Real-Time Insurance Verification

10 min per verification

Manual eligibility checks take 8-12 minutes per patient. Errors cause claim denials that cost $118 each to rework.

toolsworkflowagent
↔️
Specialists

Automated Referral Intake

2 days per referral

Referral processing takes 2-4 days. Incomplete referrals cause 40% rework and delay patient care.

embeddingstoolsworkflowagent
🔔
Patient Engagement

Personalized Reminder System

2 staff hours per day

Generic reminders have 35% open rates. No-show rate costs the average practice $150,000/year.

memoryworkflowtools
Utilization Management

Prior Authorization Agent

14 hours per physician per week

Prior auth takes physicians 14 hours/week and is the #1 contributor to burnout. 87% are eventually approved.

agentmemoryskillsworkflow

See How AI Reads Your Text

Type any clinical note and watch it break into tokens in real time. Understand token count, cost, and context window usage.

67
Approx. Tokens
266
Characters
$0.0010
Est. Cost
0.05%
Context Used
GPT-4 Context Window Usage (128K tokens)0.052%

💡 A full 200K Claude context window holds ~150,000 words — equivalent to a 600-page medical textbook.

Show token visualization

Text split into approximate tokens:

Patient·is·a·67-year-old·male·with·a·history·of·congestive·heart·failure·presenting·with·progressive·dyspnea·on·exertion·for·the·past·three·days.·He·reports·2+·bilateral·ankle·edema·and·orthopnea·requiring·two·pillows.·Vitals:·BP·148/92,·HR·88,·SpO2·94%·on·room·air.
💰
Cost Matters
More tokens = higher API cost. Concise prompts save money at scale.
Speed Impact
Fewer tokens means faster responses — critical for real-time clinical tools.
📏
Context Limit
When the window fills up, AI forgets earlier content. Plan accordingly.

Build Better Prompts

The difference between a vague question and a great prompt is structured thinking. Fill in each slot to build a clinical-grade AI instruction.

Load an example:

Prompt Quality Score10/10 — Excellent
Sets the AI's persona, expertise, and tone.
One clear, specific action.
Background knowledge the AI needs to do the task well.
Specifies structure, length, and style of output.
Safety rails and limitations for the AI.

The AI's Working Memory

Watch what happens when a conversation grows longer than the AI can hold. Click to add messages and see older ones get forgotten.

Context Window (120 token demo)104 / 120 tokens
025%50%75%100%
What medications is Mr. Smith on?
~12 tokens
👤
🤖
Mr. Smith is on lisinopril 10mg, metformin 500mg, and atorvastatin 40mg.
~28 tokens
What were his last A1C results?
~14 tokens
👤
🤖
His last A1C was 7.2% taken on January 15th — improved from 8.1% six months ago.
~32 tokens
Can you draft a referral note to his cardiologist?
~18 tokens
👤

💡 Real models have much larger windows (8K–200K tokens) but the same principle applies: older content eventually falls out.

📏

Size Matters

GPT-4: 128K tokens. Claude 3: 200K. A 200K window fits ~500 pages of text.

💰

Bigger = Pricier

Larger context windows cost more per API call. Efficient prompts save real money.

🔍

RAG to the Rescue

Retrieval systems fetch only the relevant content — solving the context limit problem.

How AI Finds Meaning

Embeddings turn words into numbers that capture meaning. Words with similar meanings cluster together. Select a patient query to see which concepts match — even without exact words.

Patient says... (Select a query)

🔍
Heart Attack
Chest Pain
Cardiac Arrest
Angina
Diabetes
Blood Glucose
Insulin
A1C
Medication
Prescription
Dosage
Anxiety
Depression
Stress
semantic space →
↑ similarity
Cardiac
Diabetes
Medication
Mental Health
🔍
Query match center
How it works: Embeddings place words with similar meanings close together in a mathematical space. When a patient says “my chest hurts”, the AI finds the 4 closest concepts — even without exact keyword matches. This powers intelligent clinical search.

4 Ways AI Can Remember

AI memory is not one-size-fits-all. From stateless chatbots to database-connected agents, each memory type serves a different clinical purpose.

🚫Default Mode

No Memory

Stateless

Every conversation starts completely fresh. The AI has no knowledge of previous interactions.

Remembers within session
Remembers across sessions
Accesses patient history
Privacy-safe by default
“Patient asks: 'You helped me with my medications last week.' AI says: 'I have no record of that. This is our first conversation.'”

Best for: Anonymous helpdesk, public FAQ bots

⏱️Most Common

Session Memory

In-Context

Remembers everything said during the current conversation. Forgets when the session ends.

Remembers within session
Remembers across sessions
Accesses patient history
Privacy-safe by default
“During one call: 'My A1C is 7.2%... [20 messages later] ...what was my A1C again?' AI correctly recalls 7.2%.”

Best for: Appointment scheduling calls, intake forms

🧠Advanced

Long-Term Memory

Persistent

Stores key information in a database and retrieves it across future sessions.

Remembers within session
Remembers across sessions
Accesses patient history
Requires consent and storage
“Three months later: Patient returns. AI recalls: 'Welcome back, Mrs. Johnson. You prefer Tuesday mornings and are allergic to penicillin.'”

Best for: Chronic care management, patient navigation

🔗Enterprise

Tool-Backed Memory

Database Connected

Reads live from EHR, CRM, or database. Access to real patient data in real time.

Remembers within session
Remembers across sessions
Accesses live patient data
HIPAA compliance required
“AI pulls live from Epic: 'Based on your chart, your last visit was March 3rd. Dr. Patel ordered a fasting glucose. Results are pending.'”

Best for: Clinical AI copilots, prior auth, care coordination

What's the Difference?

Chatbots reply. Agents act. See the difference side-by-side with a real scheduling scenario.

Chatbot

Responds only

4 steps
💬

Patient asks question

"I need to schedule an appointment"

🤔

AI processes request

Understands intent

📝

Returns text reply

"Please call (555) 123-4567 to schedule."

Done

Patient must do the rest themselves

⚠️ Patient must still call to book. Chatbot answered the question but took no action.

Agent

Plans → Acts → Completes

6 steps (automated)
💬

Patient texts request

"I need to see Dr. Patel this week"

🧠

Agent plans steps

Goal → Identify patient → Check calendar → Confirm insurance

🔧

Uses tools

[pull_patient_record] [check_availability] [verify_insurance]

📅

Books appointment

Finds slot, reserves in EHR

📱

Sends confirmation

SMS + calendar invite sent automatically

Task complete

Without patient lifting a finger

Appointment booked automatically. Patient receives confirmation text. No staff intervention needed.

Build Your First Desktop Agent

A complete, step-by-step guide to building an AI agent that runs Claude Desktop and controls your computer — from installation to production deployment.

8 detailed steps
Real code examples
Safety guardrails
Production ready
Your progress0 / 8 steps
STEP 1Beginner5 min read

🖥️ Understand What a Desktop Agent Is

The concept before the code

A desktop agent is an AI that can see your screen, move the mouse, click buttons, type text, open files, and interact with any application — exactly like a human operator would, but driven by Claude's reasoning engine.

Unlike a chatbot that only responds with text, a desktop agent takes real actions on your computer. It uses Anthropic's computer-use capability, which gives Claude three special tools: screenshot, computer_use_mouse, and computer_use_keyboard.

🎯

Your Task / Goal

Natural language instruction

🧠

Claude Desktop (LLM Brain)

Reasoning, planning, decision-making

🔌

MCP Server (Tool Bridge)

Model Context Protocol — exposes tools to Claude

🖥️

Computer-Use API

Screenshot → Analyse → Click / Type / Scroll

⚙️

Operating System / Apps

Files, browsers, terminals, desktop apps

Claude Desktop is Anthropic's official app that connects Claude to your local machine via the Model Context Protocol (MCP). It is the easiest way to run a desktop agent without writing a custom server.

Sees your screen

Takes screenshots to understand the current state

Controls input

Clicks, types, scrolls, and drags

Manages files

Opens, reads, writes, and organises files

Runs commands

Executes shell commands and scripts

STEP 2Beginner10 min

📥 Install Claude Desktop

Get the official Anthropic app

STEP 3Beginner15 min

⚙️ Enable Computer-Use & Configure MCP

Unlock the desktop control capabilities

STEP 4Intermediate20 min

💻 Write Your First Agent Loop (Python)

Build a programmatic agent with the Anthropic SDK

STEP 5Beginner10 min

▶️ Run Your First Task

Test the agent on a real desktop action

STEP 6Intermediate25 min

🔧 Add Custom Tools via MCP

Extend your agent with domain-specific capabilities

STEP 7Intermediate15 min

🛡️ Add Safety Guardrails

Prevent unintended actions — especially in healthcare

STEP 8Advanced20 min

🚀 Deploy & Schedule Your Agent

Run it automatically on a schedule or trigger

Quick Reference — Key Commands

Install SDKpip install anthropic pyautogui pillow
Set API keyexport ANTHROPIC_API_KEY=sk-ant-...
Run agentpython desktop_agent.py
Install MCP SDKpip install mcp
Config location (mac)~/Library/Application Support/Claude/
Restart Claude DesktopQuit fully → reopen app
Limited Spots Available

Try Ezmedtech Agents in Your Clinic
Free for 2 Months

Join forward-thinking clinics already using AI to save 2+ hours per day on documentation, scheduling, and patient communication — with zero disruption to your existing workflow.

What's included in your free trial:

🤖

AI Voice Assistant

24/7 patient scheduling & triage — no hold music

📋

Auto SOAP Notes

Dictate and let AI draft your clinical notes in seconds

💊

Rx Refill Automation

Routine refills handled automatically, flagged when needed

🔒

HIPAA Compliant

End-to-end encryption, BAA included, audit logs built-in

"We cut our documentation time by 40% in the first week. The AI handles routine notes so I can focus on patients."

— Dr. A. Patel, Internal Medicine, Chicago

✓ HIPAA Compliant✓ No Credit Card✓ Cancel Anytime✓ 1-Day Setup

Register Your Clinic

Fill out the form below and our team will contact you within 1 business day.

No credit card required. We'll contact you within 1 business day to get started.

📚 Free Resources

Download Your Free AI Toolkit

Practical guides, templates, and cheat sheets built specifically for healthcare professionals — no tech background required.

Enter your name and email to unlock any resource instantly. Sign in to skip the form.

✓ Free forever  ·  ✓ No credit card  ·  ✓ Trusted by 500+ healthcare professionals

Your AI Tutor, Available 24/7

Ask any AI question in plain English. Get clear, concise answers with healthcare examples. Your patient AI teacher never gets tired of explaining.

AI for Everyone

AI Education Assistant

Hi! I'm AI for Everyone 👋 Ask me any AI concept and I'll show you an interactive visual lesson — not just plain text. Try: "What is a token?" or "Explain embeddings". For other questions, I'll answer in plain English with healthcare examples.

🛡️ This assistant is for AI education only. It does not provide medical advice, diagnoses, or clinical recommendations. All examples use fictional patient data. Requires ANTHROPIC_API_KEY to function.