new pwm test code