change from optparse to argparse, add tests for commandline