updated so that the client does not need to setup the connection