Changed from prompts to functions