Adding PWM implementation