make command line parsing stateless