changed the argument parsing method, using argparse package