replaced GPIO with PWM