separated pwm control
merged