refactor to better deal with unexpected answers to user prompts