added second try pwm_gen