add serial connection in own thread, small code optimization