wip: added half-duplex IO