removed deprecated optparse, argparse used instead