update for new format of file and logic