upgrade to handle most recent input file format