refactor arg parser