refactored and changed prompt to inquirer