Add pwm functionality