edited pwm to add Vdc buffer