serial communication inspired by ofSerial