added 'exitToScanner(prompt)' functionality