fixing up pwm rough