Implemet the mechanism of creating the connection