added pwm routine