add a loop for unrecognized input at end of script; no need to exit; minor visual change