migrate to argparse from deprecated optparse