pwm is working but needs cleaning up