Replaced old function read_midas_data and updated function calls