replaced getopt by argparse