controlLoop in own thread working