split into stream readable writeable