modify pwm framework