added threadbased dual pot control