callback function for custom prompts