replace led turnOn and turnOff with brightness