implemented read the serial connection