updated parser to take a file or list of files as an argument