encapsulate some of the command-line argument-gathering