opraveno initial vars threadPWM