solved the first PWM exercise