Modified for command line input capability