changed from optparse to argparse + whitelist