moved serial connect out of serial thread