Added Smart dimmer,
optimization