Setting up the connection