Added missing code for led on/off