Added PWM code