re-write the whole program. Add argparse support.