small refactoring to be able to unit test the argument parsing