+ pwm input working version