implemented an input parser to parse the command line arguments