Reimplement connection to support pipelining