upgrade to handle most recent input file format and data