refactor argument parsing into a separate file
fix typo