move functionality to argparse