code for testing the IR