added PWM support