replaced getopt with argparse