pwm modification