add a receiveIR function