added loop to run until aborted by user input (n), added input validation