working on pwm