Completed displayIRData() function