Changed code from Light to IR Functionality