replace optparse with argparse module. Cloes #8