use argparse
code improvements