re-factor ArgumentParser

separate different scopes into separate functions