tweaking to allow connection that is already open