Added minimal pwm functionality