added pwm brightness control