add command line arguments
change functionality to print output for command-line piping, rather than to an output file