Created separate methods to prompt user response. Created method isLegal