no need for the pipelined connection to be threadsafe
complete first version with tests