handle command-line arguments