some tinkering with the PWM