replaced argv with argparse, as per Medwards' recommendation