converted to argparse