modified for pwm fade and added a config file